from django.urls import re_path
from rest_framework.routers import SimpleRouter
from . import views


urlpatterns = [
    # 短信验证码
    re_path(r'^sms_codes/(?P<mobile>1[3-9]\d{9})/$',views.SMSCodeView.as_view()),
    # 用户注册
    re_path(r'^users/$',views.RegisterView.as_view()),
    # 用户登录
    re_path(r'^authorizations/$',views.LoginView.as_view()),
    # 个人信息
    re_path(r'^user/$',views.GetPersonInfoView.as_view()),
    # 修改个人信息
    re_path(r'^user/password/$',views.ModifyPasswordPersonInfoView.as_view()),
    # 关注
    re_path(r'^users/like/(?P<pk>\d+)/$',views.LikeUserInfoView.as_view({'post':'update','delete':'destroy'})),
    # 标签
    re_path(r'^user/label/$',views.AddSkillsLabel.as_view({'put':'update'})),
    # 上传头像
    re_path(r'^upload/avatar/$', views.AvatarView.as_view()),
    # 上传图片
    re_path(r'^upload/common/$', views.UploadAvatarView.as_view()),
]